﻿use [{0}]
delete from Hits 
where QueryId in ( select Id from Gene where AccessionVersion = @AccessionVersion )
or HitId in ( select Id from Gene where AccessionVersion = @AccessionVersion )